import request from '@/utils/request'
// 安装包管理

let BASE_ADDRESS = '/base/appVer'

//  分页查询 /base/appVer/list
export function getAppVerListApi(params) {
    return request({
        url: `${BASE_ADDRESS}/list`,
        method: "get",
        params
    })
}

// 查询最新的安装包 /base/appVer/selectAppVerByNewest
export function getSelectAppVerByNewestApi(params) {
    return request({
        url: `${BASE_ADDRESS}/selectAppVerByNewest`,
        method: "get",
        params
    })
}

// 修改版本信息 /base/appVer/edit
export function editAppVerApi(data) {
    return request({
        url: `${BASE_ADDRESS}/edit`,
        method: "post",
        data
    })
}

// 修改版本发布状态的接口 /base/appVer/updateAppVerPublish
export function updateAppVerPublishApi(data) {
    return request({
        url: `${BASE_ADDRESS}/updateAppVerPublish?id=${data.id}&publish=${data.publish}`,
        method: "put",
    })
}

// 添加新版本 /base/appVer/add
export function addAppVerApi(data) {
    return request({
        url: `${BASE_ADDRESS}/add`,
        method: "post",
        data
    })
}

// 查询版本号列表 /base/appVer/selectVerList
export function getSelectVerListApi(data) {
    return request({
        url: `${BASE_ADDRESS}/selectVerList`,
        method: "get",
        data
    })
}